﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace OAuth.EFCore.Model
{
    public class User
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Key,Required]
        public Guid userId { get; set; }

        /// <summary>
        /// 登陆名
        /// </summary>
        [Required, MaxLength(20)]
        public string userName { get; set; }

        /// <summary>
        /// 登陆密码
        /// </summary>
        [Required,MaxLength(20),MinLength(6)]
        public string userPassword { get; set; }

        /// <summary>
        /// 令牌
        /// </summary>
        public string openId { get; set; }

        /// <summary>
        /// 是否有效
        /// </summary>
        [Required]
        public int isDeal { get; set; }

        /// <summary>
        /// *默认赋值 创建时间 
        /// </summary>
        [Required]
        public DateTime createTime { get; set; }

        /// <summary>
        /// 头像
        /// </summary>
        [Required]
        public string headImg { get; set; }

    }
}
